import random
list1=[]
for i in range(8):
    list1.append(random.randint(1,33))
list2=[]
list2=listskill()
print("您的号码:",list2)
print("开奖号码：",list1)
x=0
for i in range(8):
    if list1[i]==list2[i]:
        x=x+1
if x==8:
    print("恭喜一等奖！")
elif x==7:
    print("恭喜二等奖！")
elif x==6:
    print("恭喜三等奖！")
elif x==5:
    print("恭喜四等奖！")
else:
    print("您没有中奖！")


def listskill():
    list2=[]
    for i in range(8):
        goal=eval(input("请输第个1-33的数字(共八个)："))
        if goal>=1 and goal<=33:
            list2.append(goal)
        else:
            print("请输入1-33的数字！重新输入！")
            listskill()
    return list2
